//
//  MainVideoListVC.m
//  littleVideoGo
//
//  Created by WeiWei on 2018/8/7.
//  Copyright © 2018年 Liu. All rights reserved.
//

#import "MainVideoListVC.h"

@interface MainVideoListVC ()

@end

@implementation MainVideoListVC

- (void)viewDidLoad {
    [super viewDidLoad];
    UIView *vvv = [[UIView alloc] init].fp_backgroundColor([UIColor orangeColor]);
    [self.view addSubview:vvv];
    [vvv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.view);
        make.width.height.equalTo(@(50));
    }];
    UIButton *button = (UIButton*)[[UIButton alloc] init].fp_backgroundColor([UIColor cyanColor]);
    [self.view addSubview:button];
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(vvv.mas_bottom).offset(10);
        make.centerX.equalTo(vvv.mas_centerX);
        make.width.height.equalTo(@(100));
    }];
    [button setTitle:@"好啦好啦" forState:UIControlStateHighlighted];
    [button setTitle:@"按我" forState:UIControlStateNormal];
    [button addTarget:self action:@selector(testNetWork) forControlEvents:UIControlEventTouchUpInside];
}

- (void)testNetWork {
//    NSString *userName = @"sdf";
//    NSString *password = @"sdf";
//    [UserAppServiceLoginRequest goRequestWithUserName:userName password:password success:^(NSURLSessionDataTask *task, id  _Nullable responseObject) {
//        LogRequestSuccess;
//    } failure:^(NSURLSessionDataTask * _Nullable task, NSError *error) {
//        LogRequestFailure;
//    }];
    [ProductServiceGetVideoListRequest goRequestWithPage:@(1) pageSize:@(2) uid:123 success:^(NSURLSessionDataTask *task, id  _Nullable responseObject) {
        LogRequestSuccess;
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError *error) {
        LogRequestFailure;
    }];
//    [FoundServiceGetProductListRequest goRequestWithPage:nil pageSize:nil success:^(NSURLSessionDataTask *task, id  _Nullable responseObject) {
//        LogRequestSuccess;
//    } failure:^(NSURLSessionDataTask * _Nullable task, NSError *error) {
//        LogRequestFailure;
//    }];
}


@end
